<?php $featured_category = get_theme_option('featured_category'); $featured_number = get_theme_option('featured_number'); ?>
	
<?php if(($featured_category == "Choose a category:") || ($featured_number == 'Number of post:')) { ?>
	
<?php { /* nothing */ } ?>

<?php } else { ?>

<!-- Start Featured Post Carousel -->
<div id="featured">
	<div id="featured2">
        <div id="slider">
            <ul id="sliderContent">
                
				<?php
				$category_id = get_cat_id($featured_category);
				$my_query = new WP_Query('cat='. $category_id . '&' . 'showposts='. $featured_number);
				while ($my_query->have_posts()) : $my_query->the_post();
				$do_not_duplicate = $post->ID;
				$the_post_ids = get_the_ID();
				?>
				
                <li class="sliderImage post-<?php the_ID(); ?>">
				
<?php $values = get_post_custom_values("feat-img"); if (isset($values[0])) : ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Continue reading <?php the_title(); ?>"><img src="<?php $values = get_post_custom_values("feat-img"); echo $values[0]; ?>" alt="<?php the_title(); ?>" width="550" height="285" border="0" class="fpic" /></a>
<?php else : ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Continue reading <?php the_title(); ?>"><img src="<?php echo get_featured_slider_image(); ?>" alt="<?php the_title(); ?>" width="550" height="285" border="0" class="fpic" /></a>
<?php endif; ?>


<span class="bottom">
   <a id="readmore" href="<?php the_permalink() ?>" rel="bookmark" title="Continue reading <?php the_title(); ?>">Read More</a>
    <strong class="etitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="Continue reading <?php the_title(); ?>"><?php the_title(); ?></a></strong>
    Posted by <em><?php the_author() ?></em> on <?php the_time('F jS, Y') ?> &nbsp; &nbsp; &nbsp;<em><?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?></em>                
</span>              

</li>
				
        <?php endwhile;?>
				
           </ul>
        </div>
	</div>
</div>
<!-- End Featured Post Carousel -->

<?php } ?> 